package com.ruoyi.common.base.enums;



import com.ruoyi.common.base.vo.ComKeyValueVo;

import java.util.ArrayList;
import java.util.List;

/**
 * 时间类型枚举
 *
 * @author gu
 */
public enum AlarmTypeEnum {
    GETSWDATA("1", "水文实时接口数据"),//100
    GETBASEDATA("2", "水文基础接口数据"),//200
    GETPITDATA("3", "水文井下接口数据"),//300
    GETINOUEDATA("4", "水文井上接口数据"),//500
    GETSITEDATA("5", "水文站点基础接口数据"),
    SECUREREALTIME("6", "安全监测系统实时接口数据"),
    SECUREBASE("7", "安全监测系统基本信息接口数据");
    private final String code;
    private final String type;

    AlarmTypeEnum(String code, String type) {
        this.code = code;
        this.type = type;
    }

    public static List<ComKeyValueVo> getArmTypeEnumList() {
        ArrayList<ComKeyValueVo> armTypeEnumList = new ArrayList<>();
        for (AlarmTypeEnum armTypeEnum : AlarmTypeEnum.values()) {
            ComKeyValueVo armTypeEnumVo = new ComKeyValueVo();
            armTypeEnumVo.setKey(armTypeEnum.code);
            armTypeEnumVo.setValue(armTypeEnum.type);
            armTypeEnumList.add(armTypeEnumVo);
        }
        return armTypeEnumList;
    }

    public String getCode() {
        return code;
    }

    public String getType() {
        return type;
    }
}
